package day10.practice;

/**
 * @Author juzipi
 * @Date 2021/6/24 15:53
 * @Info
 */
public class BankTest {

    public static void main(String[] args) {
        Account account = new Account(1,6000.50);
        Bank bank = new Bank();
        bank.addCustomer("Zhang","San");
        Customer customer = bank.getCustomer(0);
        customer.setAccount(account);
        //获取账户
        //连续操作
//        Account backAccount = bank.getCustomer(0).getAccount();
        Account backAccount = bank.getNumberCustomerById(1);
        //取钱
        backAccount.withdraw(200);
        //存钱
        backAccount.deposit(1000);
        System.out.println("账户："+customer.getFirstName());
        System.out.println("余额: "+backAccount.getBalance());
        bank.addCustomer("xiuli","yu");
        System.out.println("多少账户："+bank.getCustomerNumberssssss());


    }

}
